#include <iostream>
using namespace std;

int addtoTop(int n)
{
  cout<<"enter addtoTop"<<endl;
  int sum = 0;
  for(int i = 0;i <= n ; ++i)
  {
    sum += i;
  }

  cout<<"quit addtoTop"<<endl;
  return sum;
}


int main()
{
  int top = 100;

  int result = addtoTop(top);
  cout<<result<<endl;

  return 0;
}
